package com.sen.client;

import java.io.DataInputStream;
import java.io.IOException;
import java.net.Socket;

public class chatClient {
    public static void main(String[] args) throws IOException {
        //设置客户端
        Socket client = new Socket("localhost",8888);
        //接受数据
        DataInputStream dis = new DataInputStream(client.getInputStream());
        String receivedMsg = dis.readUTF();
        System.out.println(receivedMsg);
    }
}
